package com.vimi8.ebb.auth.model;

import java.util.Objects;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;


/**
 * OAuth2.0的Token对象.
 **/

/**
 * OAuth2.0的Token对象.
 */
@ApiModel(description = "OAuth2.0的Token对象.")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringCodegen", date = "2016-10-14T09:33:50.109Z")

public class Token   {
  private String access_token = null;

  private String token_type = null;

  private String refresh_token = null;

  private Long expires_in = null;

  private String scope = null;

  private String openid = null;

  private String jti = null;

  private String clientId = null;

  private String job = null;
  private String clientOrgClass=null;
  public Token access_token(String accessToken) {
    this.access_token = accessToken;
    return this;
  }
  public Token clientOrgClass(String clientOrgClass) {
    this.clientOrgClass = clientOrgClass;
    return this;
  }
  @ApiModelProperty(required = true, value = "组织类型.")
  public String getClientOrgClass() {
    return clientOrgClass;
  }

  public void setClientOrgClass(String clientOrgClass) {
    this.clientOrgClass = clientOrgClass;
  }

  /**
   * 访问令牌.
   * @return access_token
  **/
  @ApiModelProperty(required = true, value = "访问令牌.")
  public String getAccess_token() {
    return access_token;
  }

  public void setAccess_token(String access_token) {
    this.access_token = access_token;
  }

  public Token token_type(String tokenType) {
    this.token_type = tokenType;
    return this;
  }

   /**
   * 令牌类型.
   * @return token_type
  **/
  @ApiModelProperty(required = true, value = "令牌类型.")
  public String getToken_type() {
    return token_type;
  }

  public void setToken_type(String token_type) {
    this.token_type = token_type;
  }

  public Token refresh_token(String refreshToken) {
    this.refresh_token = refreshToken;
    return this;
  }

   /**
   * 刷新令牌.
   * @return refresh_token
  **/
  @ApiModelProperty(value = "刷新令牌.")
  public String getRefresh_token() {
    return refresh_token;
  }

  public void setRefresh_token(String refresh_token) {
    this.refresh_token = refresh_token;
  }

  public Token expires_in(Long expiresIn) {
    this.expires_in = expiresIn;
    return this;
  }

   /**
   * 过期时间.
   * @return expires_in
  **/
  @ApiModelProperty(value = "过期时间.")
  public Long getExpires_in() {
    return expires_in;
  }

  public void setExpires_in(Long expires_in) {
    this.expires_in = expires_in;
  }

  public Token scope(String scope) {
    this.scope = scope;
    return this;
  }

   /**
   * 权限范围.
   * @return scope
  **/
  @ApiModelProperty(value = "权限范围.")
  public String getScope() {
    return scope;
  }

  public void setScope(String scope) {
    this.scope = scope;
  }

  public Token openid(String openid) {
    this.openid = openid;
    return this;
  }

   /**
   * 开放ID.
   * @return openids
  **/
  @ApiModelProperty(required = true, value = "开放ID.")
  public String getOpenid() {
    return openid;
  }

  public void setOpenids(String openid) {
    this.openid = openid;
  }

  public Token jti(String jti) {
    this.jti = jti;
    return this;
  }

   /**
   * 本次令牌的唯一标识,可用于保证同一用户,新登录令牌挤掉老令牌.
   * @return jti
  **/
  @ApiModelProperty(value = "本次令牌的唯一标识,可用于保证同一用户,新登录令牌挤掉老令牌.")
  public String getJti() {
    return jti;
  }

  public void setJti(String jti) {
    this.jti = jti;
  }

  public Token clientId(String clientId) {
    this.clientId = clientId;
    return this;
  }

   /**
   * 客服端id.
   * @return clientId
  **/
  @ApiModelProperty(required = true, value = "客服端id.")
  public String getClientId() {
    return clientId;
  }

  public void setClientId(String clientId) {
    this.clientId = clientId;
  }

  public Token job(String job) {
    this.job = job;
    return this;
  }

  /**
   * 工作岗位.
   * @return resources
   **/
  @ApiModelProperty(value = "工作岗位.")
  public String getJob() {
    return job;
  }

  public void setJob(String job) {
    this.job = job;
}

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Token token = (Token) o;
    return Objects.equals(this.access_token, token.access_token) &&
        Objects.equals(this.token_type, token.token_type) &&
        Objects.equals(this.refresh_token, token.refresh_token) &&
        Objects.equals(this.expires_in, token.expires_in) &&
        Objects.equals(this.scope, token.scope) &&
        Objects.equals(this.openid, token.openid) &&
        Objects.equals(this.clientId, token.clientId) &&
        Objects.equals(this.jti, token.jti);
  }

  @Override
  public int hashCode() {
    return Objects.hash(access_token, token_type, refresh_token, expires_in, scope, openid, jti, clientId);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Token {\n");
    
    sb.append("    access_token: ").append(toIndentedString(access_token)).append("\n");
    sb.append("    token_type: ").append(toIndentedString(token_type)).append("\n");
    sb.append("    refresh_token: ").append(toIndentedString(refresh_token)).append("\n");
    sb.append("    expires_in: ").append(toIndentedString(expires_in)).append("\n");
    sb.append("    scope: ").append(toIndentedString(scope)).append("\n");
    sb.append("    openids: ").append(toIndentedString(openid)).append("\n");
    sb.append("    jti: ").append(toIndentedString(jti)).append("\n");
    sb.append("    clientId: ").append(toIndentedString(clientId)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

